package cn.hyatt.auth.dto.systemUser;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用户更新DTO
 *
 * @author hyatt
 */
@Getter
@Setter
@Schema(name = "用户更新DTO")
public class SystemUserUpdateDto implements Serializable {
    @Serial
    private static final long serialVersionUID = 42L;


    @Schema(description = "所属部门")
    private Long deptId;

    @Min(value = 8)
    @Max(value = 16)
    @Schema(description = "用户名")
    private String username;

    @Min(value = 8)
    @Max(value = 32)
    @Schema(description = "密码")
    private String password;

    @Schema(description = "用户昵称")
    private String nickName;

    @Pattern(regexp = "^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$")
    @Schema(description = "联系电话")
    private String phone;

    @Email
    @Schema(description = "电子邮箱")
    private String email;

    @Schema(description = "是否启用：true启用 false未启用")
    private Boolean enabled;
}
